from toee import *
from utilities import *
from Co8 import *

def san_dialog( attachee, triggerer ):
	attachee.turn_towards(triggerer)
	triggerer.begin_dialog( attachee, 1 )
	return SKIP_DEFAULT

def san_heartbeat( attachee, triggerer ):

	if (attachee.map == 5069):
		game.new_sid = 0
		return SKIP_DEFAULT

	if (not game.combat_is_active()):
		for obj in game.obj_list_vicinity(attachee.location,OLC_PC):
			if (attachee.can_see(obj)):
				game.party[0].begin_dialog(attachee,1)
				game.new_sid = 0
	return RUN_DEFAULT

def destroy_map( attachee, triggerer ):
	itemA = attachee.item_find(11098)
	if (itemA != OBJ_HANDLE_NULL):
		itemA.destroy()
	return RUN_DEFAULT
	
def run_off( attachee, triggerer ):
#	for pc in game.party:
#		attachee.ai_shitlist_remove( pc )
#		attachee.reaction_set( pc, 50 )
	attachee.runoff(attachee.location-3)
	Timed_Destroy(npc, 5000)
	return RUN_DEFAULT